#!/bin/bash
/usr/bin/sqoop import "-Dorg.apache.sqoop.splitter.allow_text_splitter=true" \
--connect 'jdbc:mysql://192.168.88.80:3306/teach?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true' \
--username root \
--password 123456 \
--query "select id,normal_class_flag,time_table_id,class_id,student_id,signin_time,inner_flag,signin_type,share_state, \
inner_ip,signin_date from tbh_student_signin_record  where 1=1 and  \$CONDITIONS" \
--hcatalog-database ol_edu_ods \
--hcatalog-table tbh_student_signin_record \
-m 1

/usr/bin/sqoop import "-Dorg.apache.sqoop.splitter.allow_text_splitter=true" \
--connect 'jdbc:mysql://192.168.88.80:3306/teach?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true' \
--username root \
--password 123456 \
--query "select id,class_id,morning_template_id,morning_begin_time,morning_end_time,afternoon_template_id, \
afternoon_begin_time,afternoon_end_time,evening_template_id,evening_begin_time,evening_end_time, \
use_begin_date,use_end_date,create_person,remark,substring(create_time,1,10) as create_time from tbh_class_time_table  where 1=1 and  \$CONDITIONS" \
--hcatalog-database ol_edu_ods \
--hcatalog-table tbh_class_time_table \
-m 1

/usr/bin/sqoop import "-Dorg.apache.sqoop.splitter.allow_text_splitter=true" \
--connect 'jdbc:mysql://192.168.88.80:3306/teach?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true' \
--username root \
--password 123456 \
--query "select * from student_leave_apply  where 1=1 and  \$CONDITIONS" \
--hcatalog-database ol_edu_ods \
--hcatalog-table student_leave_apply \
-m 1

/usr/bin/sqoop import "-Dorg.apache.sqoop.splitter.allow_text_splitter=true" \
--connect 'jdbc:mysql://192.168.88.80:3306/teach?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true' \
--username root \
--password 123456 \
--query "select * from course_table_upload_detail  where 1=1 and  \$CONDITIONS" \
--hcatalog-database ol_edu_ods \
--hcatalog-table course_table_upload_detail \
-m 1

/usr/bin/sqoop import "-Dorg.apache.sqoop.splitter.allow_text_splitter=true" \
--connect 'jdbc:mysql://192.168.88.80:3306/teach?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true' \
--username root \
--password 123456 \
--query "select id,school_id,subject_id,class_id,studying_student_count,studying_date \
from class_studying_student_count  where 1=1 and  \$CONDITIONS" \
--hcatalog-database ol_edu_ods \
--hcatalog-table class_studying_student_count \
-m 1

/usr/bin/sqoop import "-Dorg.apache.sqoop.splitter.allow_text_splitter=true" \
--connect 'jdbc:mysql://192.168.88.80:3306/teach?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true' \
--username root \
--password 123456 \
--query "select * from calendar  where 1=1 and  \$CONDITIONS" \
--hcatalog-database ol_edu_ods \
--hcatalog-table calendar \
-m 1